#include<stdio.h>
int main()
{
	int n, m, sum;
	scanf("%d%d", &n, &m);
	sum = 0;
	while (n != 1)
	{
		if (n%2==0)
		{
			n = n/2;
			m = 2*m;
		}
		else
		{
			printf("%d + ", m);
			sum += m;
			n = (n-1)/2;
			m = 2*m;
		}
	}
	printf("%d = %d\n", m, sum+m);
	return 0;
}
